% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/one-step.R
\name{poststrat_onestep}
\alias{poststrat_onestep}
\title{Do post-stratification and summarize draws in one step}
\usage{
poststrat_onestep(
  fit,
  poststrat_tgt,
  orig_data = NULL,
  area_var = "cd",
  count_var = "count",
  ...
)
}
\arguments{
\item{fit}{A brms object from \code{fit_brms}.}

\item{poststrat_tgt}{The poststratification target. It must contain the column
\code{count}, which is treated as the number of \code{trials} in the binomial model.}

\item{orig_data}{original survey data. This defaults to NULL but if supplied
be used to (1) subset the poststratification, to areas only in the survey, and
(2) label the question outcome.}

\item{area_var}{A character string for the variable name(s) for area to group
and aggregate by. That is, the area of interest in MRP. Defaults to \code{"cd"}}

\item{count_var}{A character string for the variable name for the population
count in the \code{poststrat_tgt} dataframe. This will be renamed as if it is
a trial count in the model. Defaults to \code{"count"}.}

\item{...}{Additional arguments to \code{poststrat_draws}}
}
\description{
Do post-stratification and summarize draws in one step
}
\details{
A simple wrapper around \code{poststrat_draws} and \code{summ_sims}.
}
